package com.mt.restaurant.service.material;

import com.mt.common.core.web.base.PageDTO;
import com.mt.common.core.web.base.PageResultDTO;
import com.mt.restaurant.entity.material.SupplyMaterial;

import java.util.List;

public interface SupplyMaterialService {
    /**
     * 根据分页参数查询供应原材料集合
     *
     * @param pageDTO 分页条件
     */
    public PageResultDTO findSupplyMaterials(PageDTO pageDTO);

    /**
     * 查询全部供应原材料集合
     *
     */
    public List<SupplyMaterial> findAllSupplyMaterials();

    /**
     * 根据名称查询供应原材料集合(只提取ID 和 Name)
     *
     * @param supplyMaterialName 名称
     */
    public List<SupplyMaterial> findSupplyMaterialsWithIdNameByName(String supplyMaterialName);

    /**
     * 查询所有供应原材料集合(只提取ID 和 Name)
     *
     */
    public List<SupplyMaterial> findAllSupplyMaterialsWithIdName();

    /**
     * 根据ID查询指定的供应原材料(只提取ID 和 Name)
     *
     * @param supplyMaterialId Id
     */
    public SupplyMaterial findSupplyMaterialsWithIdNameById(Long supplyMaterialId);

    /**
     * 根据ID查询指定的供应原材料
     *
     * @param supplyMaterialId Id
     */
    public SupplyMaterial findSupplyMaterial(Long supplyMaterialId);

    /**
     * 根据ID查询指定的供应原材料(包含外键)
     *
     * @param supplyMaterialId Id
     */
    public SupplyMaterial findSupplyMaterialWithForeignName(Long supplyMaterialId);

    /**
     * 新增供应原材料
     *
     * @param supplyMaterial 实体对象
     */
    public SupplyMaterial saveSupplyMaterial(SupplyMaterial supplyMaterial);

    /**
     * 更新供应原材料
     *
     * @param supplyMaterial 实体对象
     */
    public SupplyMaterial updateSupplyMaterial(SupplyMaterial supplyMaterial);

    public SupplyMaterial updateSupplyMaterialFailuresNum(Long supplyMaterialId);

    /**
     * 根据ID删除供应原材料
     *
     * @param supplyMaterialId ID
     */
    public void deleteSupplyMaterial(Long supplyMaterialId);

    public List<SupplyMaterial> changeSupplyMateialById(Long materialId, List<SupplyMaterial> supplyMaterials);
}
